home *** CD-ROM | disk | FTP | other *** search
- 10 rem - puzzler's choice for c=64
- 20 rem - daniel miller
- 30 rem - astoria, n.y. 11103
- 40 rem - 4/19/86
- 50 vo=54296:wv=54276:at=54277:hi=54273:lo=54272:mv=0:goto110
- 60 poke781,p/40:poke782,p-40*peek(781):poke783,0:sys65520:return
- 65 poke785,232:poke786,7:poke209,232:poke210,7:poke211,0:poke213,39
- 66 print" s&$[146][223]hd[146][193]$[146][160]d[146][194][160]":pokerl,peek(rl):rl=usr(rl):return
- 70 pokevo,15:pokewv,17:pokeat,15:pokehi,68:pokelo,149
- 80 fortm=1to100:next:pokewv,0
- 90 pokevo,15:pokewv,17:pokeat,15:pokehi,34:pokelo,75
- 100 fortm=1to100:next:pokewv,0:return
- 110 poke53280,2:poke53281,0:poke646,1
- 120 print"[147]":p=53:gosub60:print"puzzler's choice[146]":print
- 130 p=170:gosub60:print"select choice:":print
- 140 print" 1. alphabet puzzle":print" 2. juggernaut":
- 150 print" 3. checkers switch":print" 4. end program":print
- 160 printtab(15)" enter (1-4): ";:ct=fre(0)
- 170 getch$:ifch$<"1"orch$>"4"then170
- 180 printch$:on val(ch$)goto200,1420,2510,190
- 190 end
- 200 dima$(16),b$(16),lt$(16),lu$(16),a(16),d1$(4,4)
- 210 aa=0:l2=rnd(-ti):x1=16:goto1230
- 220 print"[147]":poke53281,11
- 230 p=54:gosub60:print"alphabet puzzle[146]":print:ct=fre(0)
- 240 rem - puzzle screen
- 250 p=120:gosub60:print"";
- 260 printtab(15)a$(1);"[145][145]"a$(2);"[145][145]"a$(3);"[145][145]"a$(4)
- 270 printtab(15)a$(5);"[145][145]"a$(6);"[145][145]"a$(7);"[145][145]"a$(8)
- 280 printtab(15)a$(9);"[145][145]"a$(10);"[145][145]"a$(11);"[145][145]"a$(12)
- 290 printtab(15)a$(13);"[145][145]"a$(14);"[145][145]"a$(15);"[145][145]"a$(16)
- 300 ifmv>0thengosub70
- 310 ifaa=0then330
- 320 onaa-1 goto610,750,820
- 330 p=686:gosub60:print" your goal in this puzzle is to"
- 340 print" rearrange the letters on the playing"
- 350 print" board into order to be displayed on"
- 360 print" the screen."
- 370 p=926:gosub60:print"[158]press <return> to continue[146]";
- 380 wait 198,1:get rt$
- 390 fory=17to24:poke781,y:sys59903:next
- 400 p=682:gosub60:print" there are more than ten trillion"
- 410 print" letter combinations.":print
- 420 print" press 'f7' to end the puzzle.":print
- 430 printtab(14)"happy puzzling !";
- 440 fortm=1to4000:nexttm
- 450 fory=17to24:poke781,y:sys59903:next
- 460 p=844:gosub60:print"[159]press <return> to scramble letters[146]";:poke198,0
- 470 wait 198,1:get rt$
- 480 rt$="":poke781,21:sys59903
- 490 rem - scramble letters on puzzle screen
- 500 forx=1to16:a(x)=0:nextx
- 510 forlt=1to16:lt$(lt)=mid$(d$,lt,1):nextlt
- 520 l1=1
- 530 forll=1to16
- 540 l2=int(16*rnd(1))+1
- 550 ifa(l2)>0then540
- 560 lu$(l1)=lt$(l2):a(l2)=l2:l1=l1+1:nextll
- 570 d$="":forx=1to16:d$=d$+lu$(x):nextx
- 580 forx=1to16:lt$(x)="":a(x)=0:nextx
- 590 aa=2:goto1240
- 600 rem - is arrangement possible ?
- 610 ct=0:z=1:fory=1to16
- 620 forx=zto15:ifmid$(d$,x+1,1)<lu$(z)thenct=ct+1
- 630 nextx:z=z+1:nexty
- 640 iflu$(2)="p"orlu$(4)="p"orlu$(5)="p"orlu$(7)="p"thenct=ct+1:goto660
- 650 iflu$(10)="p"orlu$(12)="p"orlu$(13)="p"orlu$(15)="p"thenct=ct+1
- 660 poke781,18:sys59903
- 670 rem - ct:even - yes; ct:odd - no
- 680 ifct/2=int(ct/2)then700
- 690 goto500
- 700 e$="":forx=1to16:e$=e$+lu$(x):nextx:rem - solution format
- 710 p=970:gosub60:print"[159]press <return> to begin[146]";
- 720 wait 198,1:get rt$
- 730 poke781,21:sys59903:poke781,24:sys59903:rt$=""
- 740 aa=3:goto1230
- 750 forx=1to16:iflu$(x)="p"thenlu$(x)="[158] [146][159]":goto770
- 760 nextx
- 770 p=270:gosub60:print"[159]solve[146]"
- 780 p=350:gosub60:printlu$(1);" ";lu$(2);" ";lu$(3);" ";lu$(4)
- 790 printtab(30);lu$(5);" ";lu$(6);" ";lu$(7);" ";lu$(8)
- 800 printtab(30);lu$(9);" ";lu$(10);" ";lu$(11);" ";lu$(12)
- 810 printtab(30);lu$(13);" ";lu$(14);" ";lu$(15);" ";lu$(16)
- 820 ifd$=e$then1100:rem - puzzle solved
- 830 forx=1to16:lt$(x)=mid$(d$,x,1):next x
- 840 x=1:forro=1to4:forcl=1to4:d1$(ro,cl)=mid$(d$,x,1):x=x+1:nextcl,ro
- 850 forro=1to4:forcl=1to4:ifd1$(ro,cl)="p" thenr1=ro:c1=cl
- 860 nextcl,ro:p=852:gosub60:print"press 'f7' to end"
- 870 p=696:gosub60:print"letter ?[159] [146]";:poke198,0
- 880 getlt$:iflt$=""then880
- 890 iflt$="[136]"then1210
- 900 iflt$<"a"orlt$>"o"thenlt$="":goto880
- 910 print"";lt$;
- 920 forro=1to4:forcl=1to4:ifd1$(ro,cl)=lt$then r2=ro:c2=cl
- 930 nextcl,ro
- 940 ifabs(r1-r2)=1 and abs(c1-c2)=1 then960
- 950 ifsqr((r1-r2)^2+(c1-c2)^2)=1 then990
- 960 forx=1to5:p=935:gosub60:print"invalid move[146]";:fortm=1to500:nexttm
- 970 poke781,23:sys59903:fortm=1to500:nexttm,x
- 980 p=705:gosub60:print" ";:goto870
- 990 forx=1to16:iflt$(x)=lt$thenx1=x
- 1000 nextx
- 1010 forx=1to16:iflt$(x)="p"thenx2=x
- 1020 nextx
- 1030 lt$(x1)="p":lt$(x2)=lt$
- 1040 d$="":forx=1to16:d$=d$+lt$(x):nextx
- 1050 p=705:gosub60:print" ";
- 1060 p=776:gosub60:print"[158]move # [146]";
- 1070 mv=mv+1:p=782:gosub60:print"[158]";str$(mv)"[146]";
- 1080 aa=4:goto1240
- 1090 rem - end puzzle
- 1100 p=808:gosub60:print"you've solved the puzzle![146]";
- 1110 forcl=lo to lo+24:pokecl,0:next
- 1120 pokelo+5,85:pokelo+6,85:pokelo+12,85:pokelo+13,85:pokelo+24,15
- 1130 pokelo+4,33:pokelo+11,17:rl=1190:gosub65
- 1140 forx=1to6:readh1,l1,h2,l2:pokelo,l1:pokelo+1,h1:pokelo+7,l2:pokelo+8,h2
- 1150 ifh1=50thenfortm=1to200:nexttm
- 1160 fortm=1to100:nexttm
- 1170 nextx
- 1180 forcl=lo to lo+24:pokecl,0:next
- 1190 data25,30,18,209,33,135,25,30,42,62,31,165,50,60,37,162,42,62,31,165
- 1200 data50,60,37,162
- 1210 p=927:gosub60:print"[159]thanks for playing. 'bye'.[146]";
- 1220 fortm=1to1500:nexttm:poke198,0:run
- 1230 d$="abcdefghijklmnop":rem - puzzle format
- 1240 forx=1to16:ifmid$(d$,x,1)="p" thenx1=x
- 1250 nextx:ifmv=0then1280
- 1260 forx=1to16:ifmid$(d$,x,1)=lt$ then a=asc(lt$)-64:a$=lt$:goto1300
- 1270 nextx
- 1280 forx=1to16:a$(x)=""
- 1290 a$=mid$(d$,x,1)
- 1300 b=(a$="a")+(a$="c")+(a$="f")+(a$="h")+(a$="i")+(a$="k")+(a$="n")
- 1305 b=-1320*(b=-1)-1350*(b=0)
- 1310 poke785,188:poke786,168:pokeb,peek(b):b=usr(0)
- 1320 a$(x)="[166][166][166][157][157][157][166][146]"+a$+"[166][157][157][157][166][166][166][146]":rem "[166]" is 'c= +' [chr$(166)]
- 1330 ifmv>0then1380
- 1340 nextx:goto1380
- 1350 a$(x)=" [157][157][157] [146]"+a$+" [157][157][157] [146]"
- 1360 ifmv>0then1380
- 1370 nextx
- 1380 a$(x1)="[158] [157][157][157] [157][157][157] [146]"
- 1390 ifaa=0then220
- 1400 goto230
- 1410 rem - juggernaut main loop
- 1420 dim lc%(10),ch$(10),sp(2),sp$(10):goto2400
- 1430 p=788:gosub60:print" [157]";:ct=fre(0):poke198,0
- 1440 getmv$:forx=1to11:ifmv$=mid$("[133][136]abcdefghi",x,1)then1460
- 1450 next:goto1440
- 1460 ifmv$="[136]"then1800
- 1470 if mv$<>"[133]"then1500
- 1480 sol=1:s=0:mv=0:sol$="beha":goto2420
- 1490 s=s+1:mv$=mid$(sol$,s,1)
- 1500 p=788:gosub60:print mv$
- 1510 if ch$(asc(mv$)-64)<>"x" and ch$(asc(mv$)-63)<>"x" then1530
- 1520 msg$="invalid move[146]":p1=855:gosub1860:goto1430
- 1530 for x=1 to 10:if ch$(x)="x" thenlc=x:ld=x+1:goto1550
- 1540 next
- 1550 sp(1)=asc(mv$)-64:sp(2)=asc(mv$)-63
- 1560 rem - move checkers
- 1570 for y=ly% to lz% step-1
- 1580 pokev+val(sp$(sp(2))),y:pokev+val(sp$(sp(1))),y:next
- 1590 if sp(1)>lc then1640
- 1600 for x=lx%(sp(2)) to lx%(ld)
- 1610 pokev+val(sp$(sp(2)))-1,x:next
- 1620 for x=lx%(sp(1)) to lx%(lc)
- 1630 pokev+val(sp$(sp(1)))-1,x:next:goto1680
- 1640 for x=lx%(sp(1)) to lx%(lc) step-1
- 1650 pokev+val(sp$(sp(1)))-1,x:next
- 1660 for x=lx%(sp(2)) to lx%(ld) step-1
- 1670 pokev+val(sp$(sp(2)))-1,x:next
- 1680 for y=lz% to ly%
- 1690 pokev+val(sp$(sp(2))),y:pokev+val(sp$(sp(1))),y:next
- 1700 rem - update arrays & move-ctr
- 1710 ch$(lc)=ch$(sp(1)):ch$(ld)=ch$(sp(2)):ch$(sp(1))="x":ch$(sp(2))="x"
- 1720 sp$(lc)=sp$(sp(1)):sp$(ld)=sp$(sp(2)):sp$(sp(1))="xx":sp$(sp(2))="xx"
- 1730 mv=mv+1:p=516:gosub60:print""right$(str$(mv),len(str$(mv))-1)"[146]";
- 1740 slv$="":for x=1 to 10:slv$=slv$+ch$(x):next
- 1750 if slv$=win$ then1780
- 1760 if sol=1 then1490
- 1770 goto1430
- 1780 if sol=1 then1800
- 1790 msg$="congratulations !![146]":p1=850:gosub1860
- 1800 poke781,21:sys59903:poke198,0:p=851:gosub60:print"try again [y/n]: ";
- 1810 get yn$:if yn$<>"y" and yn$<>"n" thenyn$="":goto1810
- 1820 print yn$:pokev+21,0
- 1830 if yn$="y" then run1420
- 1840 run
- 1850 rem - message rtn.
- 1860 p=p1+80:for x=1 to 5:gosub60:print msg$;:for tm=1 to 500:next tm
- 1870 poke781,23:sys59903:fortm=1to500:nexttm,x
- 1880 print"":return
- 1890 rem - set up screen
- 1900 p=95:gosub60:print"juggernaut[146]";
- 1910 p=402:gosub60:printl1$:p=p+40:gosub60:printl1$
- 1920 for x=1 to 3:gosub1930:next:goto1940
- 1930 printspc(2)l3$;spc(28)l3$:return
- 1940 p=p+160:gosub60:printl1$
- 1950 p=524:gosub60:for x=1 to 9:printl2$;:p=p+3:gosub60:next
- 1960 p=684:gosub60:for x=1 to 9:print""chr$(x+64);:p=p+3:gosub60:next
- 1970 p=434:gosub60:print"[150]move#[146]";
- 1980 rem - checker sprites
- 1990 v=53248:v1=2040:t=13:pokev+23,0:pokev+29,0
- 2000 pokev1,t:pokev1+1,t:pokev1+2,t:pokev1+3,t:pokev1+4,t
- 2010 pokev1+5,t:pokev1+6,t:pokev1+7,t
- 2020 rem - set up sprites
- 2030 rl=2170:gosub65
- 2040 for sp=832 to 894:read q1:pokesp,q1:next
- 2050 for x=39 to 45 step2:pokev+x,7:next
- 2060 for x=40 to 46 step2:pokev+x,2:next
- 2070 for y=1 to 15 step2:pokev+y,160:next
- 2080 z=40:for x=0 to 14 step2:pokev+x,z:z=z+24:next:pokev+21,255
- 2090 if zz=0 goto2150
- 2100 p=202:gosub60:print"solution: [209] [209] [209] [209] [158][209] [209] [209] [209]";
- 2110 p=254:gosub60:print"a b c d e f g h i";
- 2120 if sol=1 then1490
- 2130 p=842:gosub60:print"'f1' - auto solve 'f7' - menu";
- 2140 p=770:gosub60:print"enter move [a-i]:";:goto1430
- 2150 l1$="":l2$="":l3$="":goto2240
- 2160 rem - sprite data
- 2170 data 0,0,0,0,0,0,0,0,0
- 2180 data 0,62,0,1,255,192,7,255,240
- 2190 data 15,255,248,31,255,252,63,255,254
- 2200 data 63,255,254,127,255,255,127,227,255
- 2210 data 127,227,255,63,255,254,63,255,254
- 2220 data 31,255,252,15,255,248,7,255,240
- 2230 data 1,255,192,0,62,0,0,0,0
- 2240 p=240:gosub60:print" your goal is to move the checkers from"
- 2250 print" these positions:";:for tm=1 to 3000:next:pokev+21,0
- 2260 gosub2380
- 2270 p=280:gosub60:print" to these positions:";
- 2280 for x=39 to 42:pokev+x,2:next
- 2290 for x=43 to 46:pokev+x,7:next
- 2300 for y=1 to 15 step2:pokev+y,160:next
- 2310 z=88:for x=0 to 12 step2:pokev+x,z:z=z+24:next:pokev+14,255:pokev+21,255
- 2320 for tm=1 to 2500:next:gosub2380
- 2330 p=240:gosub60:print" after you select a letter, the two"
- 2340 print" adjacent checkers above it will move.":for tm=1 to 3000:next:gosub2380
- 2350 p=240:gosub60:print" this puzzle can be solved in 4 moves."
- 2360 for tm=1 to 2500:next
- 2370 pokev+21,255:zz=1:gosub2380:goto2050
- 2380 poke781,6:sys59903:poke781,7:sys59903:return
- 2390 rem - initialization
- 2400 print"[147]":poke53280,11:poke53281,0
- 2410 win$="xxrrrryyyy":sol=0:s=0
- 2420 for x=2 to 8 step2:ch$(x)="r":next:for x=1 to 7 step2:ch$(x)="y":next
- 2430 ch$(9)="x":ch$(10)="x"
- 2440 lz%=140:ly%=160:lw%=40:for x=1 to 9:lx%(x)=lw%:lw%=lw%+24:next
- 2450 lx%(10)=255
- 2460 sp%=1:for x=1 to 8:sp$(x)=str$(sp%):sp%=sp%+2:next
- 2470 if sol=1 then2370
- 2480 l1$="[159] [146]":l2$="[159] [157][157] [146]":l3$="[159] [146]"
- 2490 goto1900
- 2500 rem - switch
- 2510 dim b(45),c(45),a$(4),er$(5):gosub3610:goto3270
- 2520 rem- puzzle screen
- 2530 ct=fre(0):p=13:gosub60:printhdg$;
- 2540 p=129:gosub60:print"1[146] 2[146] 3[146] 4[146] 5[146] 6[146] 7[146] 8[146] 9[146]"
- 2550 p=160:gosub60:print"";
- 2560 printtab(8)a$(b(1))"[145][145]"a$(b(2))"[145][145]"a$(b(3))"[145][145]"a$(b(4))"[145][145]"a$(b(5))"[145][145]";
- 2570 printtab(21)a$(b(6))"[145][145]"a$(b(7))"[145][145]"a$(b(8))"[145][145]"a$(b(9))
- 2580 if val(f2$)<>1 then2600
- 2590 gosub70
- 2600 printtab(8)a$(b(10))"[145][145]"a$(b(11))"[145][145]"a$(b(12))"[145][145]"a$(b(13))"[145][145]"a$(b(14));
- 2610 printtab(21)"[145][145]"a$(b(15))"[145][145]"a$(b(16))"[145][145]"a$(b(17))"[145][145]"a$(b(18))
- 2620 if val(f2$)<>2 then2640
- 2630 gosub70
- 2640 printtab(8)a$(b(19))"[145][145]"a$(b(20))"[145][145]"a$(b(21))"[145][145]"a$(b(22))"[145][145]"a$(b(23));
- 2650 printtab(21)"[145][145]"a$(b(24))"[145][145]"a$(b(25))"[145][145]"a$(b(26))"[145][145]"a$(b(27))
- 2660 if val(f2$)<>3 then2680
- 2670 gosub70
- 2680 printtab(8)a$(b(28))"[145][145]"a$(b(29))"[145][145]"a$(b(30))"[145][145]"a$(b(31))"[145][145]"a$(b(32));
- 2690 printtab(21)"[145][145]"a$(b(33))"[145][145]"a$(b(34))"[145][145]"a$(b(35))"[145][145]"a$(b(36))
- 2700 if val(f2$)<>4 then2720
- 2710 gosub70
- 2720 printtab(8)a$(b(37))"[145][145]"a$(b(38))"[145][145]"a$(b(39))"[145][145]"a$(b(40))"[145][145]"a$(b(41));
- 2730 printtab(21)"[145][145]"a$(b(42))"[145][145]"a$(b(43))"[145][145]"a$(b(44))"[145][145]"a$(b(45))
- 2740 if val(f2$)<>5 then2760
- 2750 gosub70
- 2760 ifmv=0then x=49:forp=206to686step120:gosub60:print""chr$(x);:x=x+1:nextp
- 2770 p=765:gosub60:print"'f1' - auto solve 'f7' - menu";
- 2780 p=857:gosub60:print"[156]move #[146]";
- 2790 p=931:gosub60:print"[159]from ?"spc(9)"to ?[146]"
- 2800 if d$=e$ then3170:rem - puzzle solved
- 2810 if zz=1 then for tm=1 to 2000:next tm:return
- 2820 rem- move routine
- 2830 p=939:gosub60:print" ";spc(11)" ";
- 2840 p=939:gosub60:print" ";:gosub60:printcr$;:ifsol=0 then2860
- 2850 p=939:gosub60:read fr$,tu$
- 2855 print""left$(fr$,1);"";right$(fr$,1);"[146]";
- 2856 printspc(9)" ";left$(tu$,1);"";right$(tu$,1);"[146]";:goto2960
- 2860 getf$:forx=1to7:iff$=mid$("[133][136]12345",x,1)then2880
- 2870 nextx:f$="":goto2860
- 2880 if f$<>"[133]"then2910
- 2890 sol=1:s=0:mv=0:zz=0
- 2900 d$="":e$="":f2$="":mo$="":ct=fre(0):gosub3750:goto2530
- 2910 if f$="[136]"then3590
- 2920 print""f$;:poke198,0
- 2930 getg$:forx=1to9:ifg$=mid$("123456789",x,1)then2950
- 2940 nextx:goto2930
- 2950 print""g$"[146]";:fr$=f$+g$:f$="":g$=""
- 2960 h=val(fr$):gosub3500:fr=h:c(fr)=val(mid$(d$,fr,1)):ifsol=1then3030
- 2970 p=950:gosub60:print" ";:p=951:gosub60:printcr$;:poke198,0
- 2980 getf$:forx=1to5:ifmid$("12345",x,1)=f$thenprint""f$;:poke198,0:goto3000
- 2990 nextx:goto2980
- 3000 getg$:forx=1to9:ifmid$("123456789",x,1)=g$thenprint""g$"[146]";:goto3020
- 3010 nextx:goto3000
- 3020 tu$=f$+g$:f$="":g$=""
- 3030 h=val(tu$):gosub3500:tu=h:c(tu)=val(mid$(d$,tu,1))
- 3040 z1=val(left$(fr$,1)):z2=val(right$(fr$,1))
- 3050 z3=val(left$(tu$,1)):z4=val(right$(tu$,1))
- 3060 f2$=left$(fr$,1)
- 3070 fr$=mid$(d$,fr,1):tu$=mid$(d$,tu,1)
- 3080 if fr$="4" then er=1:goto3230
- 3090 if tu$="1" or tu$="2" then er=2:goto3230
- 3100 if fr$="3" or tu$="3" then er=3:goto3230
- 3110 if z1=z3 or z2=z4 then er=4:goto3230
- 3120 c=c(tu):c(tu)=c(fr):c(fr)=c
- 3130 d$="":for x=1 to 45:d$=d$+right$(str$(c(x)),1):next x
- 3140 p=979:gosub60:print" ";spc(11)" ";
- 3150 for x=1 to 45:b(x)=val(mid$(d$,x,1)):next x
- 3160 mv=mv+1:mo$=""+str$(mv)+"[146]":p=864:gosub60:printmo$;:goto2530
- 3170 ifsol=1then3590
- 3180 for x=1 to 5
- 3190 p=967:gosub60:print"you solved the puzzle![146]":fortm=1to1500:next
- 3200 poke781,24:sys59903:fortm=1to500:nexttm,x
- 3210 goto3590
- 3220 rem- flash error messages
- 3230 f2$="":tb=(24-(len(er$(er))/2)):poke781,24:sys59903:forx=1to5
- 3240 p=960:gosub60:printtab(tb)er$(er);:fortm=1to500:nexttm
- 3250 poke781,24:sys59903:fortm=1to500:nexttm,x:goto2530
- 3260 rem- instructions
- 3270 poke 53281,1
- 3280 print"[147]"chr$(14):p=132:gosub60:printh2$;:print:print
- 3290 print" [208]repare to test your puzzler's":print
- 3300 print" skills. [197]ight [215]hite[146] checkers and":print
- 3310 print" eight [144][194]lack[146] checkers are positioned":print
- 3320 print" on opposite sides of the checkerboard ";:print
- 3330 print" as shown:"
- 3340 zz=1:gosub3480:poke53281,1
- 3350 print"[147]":p=132:gosub60:printh2$;:print:print:zz=0
- 3360 print" [217]our goal is to switch the checkers":print
- 3370 print" to the reverse sides of the board. [193]":print
- 3380 print" checker can be moved to a [210]ed[146] square":print
- 3390 print" or can be jumped over another piece":print
- 3400 print" to another [210]ed[146] square. [215]hite[146] pieces":print
- 3410 print" move to the [210][201][199][200][212]; [144][194]lack[146] checkers":print
- 3420 print" can move only to the [204][197][198][212]."
- 3430 for tm=1 to 3000:next tm
- 3440 print"[147]":p=120:gosub60:printchr$(14)"[195]heckers [211]witch";:print:print
- 3450 print" [212]his puzzle can be solved in 52":print
- 3460 print" moves.":print:print
- 3470 print" [200]ave fun and [199]ood [204]uck !"
- 3480 for tm=1 to 2500:next tm:print"[147]":d$="":e$="":f2$="":gosub3750
- 3490 mv=0:poke53281,11:print"[147]"chr$(142):goto2530
- 3500 rem- convert 'from-to' position in string
- 3510 ifh>10thenifh<20thenifh/2<>int(h/2)thenh=h-10:return
- 3520 ifh>21thenifh<29thenifh/2=int(h/2)thenh=h-11:return
- 3530 ifh>30thenifh<40thenifh/2<>int(h/2)thenh=h-12:return
- 3540 ifh>41thenifh<49thenifh/2=int(h/2)thenh=h-13:return
- 3550 ifh>50thenifh<60thenifh/2<>int(h/2)thenh=h-14:return
- 3560 er=3:goto3230:rem - move invalid
- 3570 rem- end puzzle message
- 3580 poke781,23:sys59903
- 3590 p=928:gosub60:print"thanks for playing. 'bye.[146]";
- 3600 fortm=1to3000:next:run
- 3610 rem- build character graphics
- 3620 gr$=" [146][157][157][157]"
- 3630 a$(1)=gr$+" [146][209] [146][157][157][157] [146]"
- 3640 a$(2)=gr$+" [146][144][209] [146][157][157][157] [146]"
- 3650 a$(3)=" [146][157][157][157] [146][157][157][157] [146]"
- 3660 a$(4)=gr$+" [146][157][157][157] [146]"
- 3670 gr$="":cr$="[158] [146]"
- 3680 hdg$="[158]checkers switch[146]":h2$=chr$(14)+"[195]heckers [211]witch[146]"
- 3690 rem- errors
- 3700 er$(1)="[158]'from' position empty[146]":er$(2)="[158]'to' position occupied[146]"
- 3710 er$(3)="[158]invalid 'from-to' position[146]"
- 3720 er$(4)="[158]move not diagonal[146]":er$(5)="[158]invalid move[146]"
- 3730 f2=0:f2$="":rl=3790:gosub65
- 3740 rem- puzzle format
- 3750 d$="431343234313132323131343232313132323431343234"
- 3760 printchr$(142):forx=1to45:b(x)=val(mid$(d$,x,1)):c(x)=b(x):nextx
- 3770 rem- puzzle solved format
- 3780 e$="432343134323231313232343131323231313432343134":return
- 3790 data26,35,44,26,35,44,24,35,46,24,37,46,26,37,17,26,35,17,13,35,24,13
- 3800 data33,24,44,33,26,44,35,26,46,35,24,46,42,24,31,42,13,31,22,13,33,22
- 3810 data44,33,53,44,35,53,57,35,48,57,39,48,17,39,28,17,37,28,48,37,26,48
- 3820 data44,26,35,44,17,35,26,17,37,26,46,37,24,46,35,24,13,35,24,13,42,24
- 3830 data33,42,44,33,26,44,35,26,57,35,46,57,24,46,35,24
-